package it.giuseppefrattura.wwdefence;

public class Mappe {
	

	private float startX=0;

	private char[][] map ={
			{'N','N','N','N','N','N','N','N'},
			{'N','N','U','A','S','N','N','N'},
			{'N','N','U','N','S','N','A','A'},
			{'A','A','A','N','S','N','U','N'},
			{'N','N','N','N','S','N','U','N'},
			{'N','N','N','N','S','N','U','N'},
			{'N','N','N','N','A','A','U','N'},
			{'N','N','N','N','N','N','N','N'}
	};

	private char[][] map1 ={
			{'N','N','N','N','N','N','N','N'},
			{'N','A','A','S','N','N','N','N'},
			{'N','U','N','S','N','A','A','A'},
			{'A','U','N','S','N','U','N','N'},
			{'N','N','N','S','N','U','N','N'},
			{'N','N','N','S','N','U','N','N'},
			{'N','N','N','A','A','U','N','N'},
			{'N','N','N','N','N','N','N','N'}
	};
	
	
	public char[][] getMappa(int index) throws Exception{
		switch (index) {
		case 1:
			return map;
		case 2:
			return map1;
		default:
			throw new Exception();
		}
	}
	
	public float getStartX() {
		return startX;
	}

	public float getStartY(int index) throws Exception {
		for (int i=0; i<8; i++){
			switch (index) {
			case 1:
				if (map[i][0]!='N') return i*60;
				break;
			case 2:
				if (map1[i][0]!='N') return i*60;
				break;
			default:
				throw new Exception();
			}
			
		}
		return 0;
	}
	
	public int getEnemynumber(int index) throws Exception {
		int enemynumber =0;
		switch (index) {
		case 1:
			enemynumber = 15;
			break;
		case 2:
			enemynumber = 10;
			break;
		default:
			throw new Exception();
		}
		return enemynumber;
	}
	
}
